﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AdaptiveAgents.Running_Tools.Agent_Lists
{   
    /// <summary>
    /// This class contains list of agents type.
    /// </summary>
    public abstract class AgentsList
    {
        /// <summary>
        /// List of agents type.
        /// </summary>
        protected List<string> _AgantList;
        /// <summary>
        /// Size of the list.
        /// </summary>
        protected int _Size;
        /// <summary>
        /// The type of the list.
        /// </summary>
        protected string _Type;

        /// <summary>
        /// Default Ctor
        /// </summary>
        public AgentsList() { _AgantList = new List<string>(); }


        /// <summary>
        /// Ctor of "AgentList" Class.
        /// </summary>
        /// <param name="list">List of agents type</param>
        /// <param name="size">Size of the list</param>
        /// <param name="type">Type fo the list</param>
        public AgentsList(List<string> list, int size, string type)
        {
            _AgantList = list;
            _Size = size;
            _Type = type;
        }


        /// <summary>
        /// Ctor of "AgentList" Class.
        /// </summary>
        /// <param name="type">Type of the list</param>
        /// <param name="size">Size of the list</param>
        public AgentsList(string type, int size)
        {
            _AgantList = new List<string>();
            _Type = type;
            _Size = size;
        }        


        /// <summary>
        /// Setter and Getter to the agents list
        /// </summary>
        public List<string> AgentsList
        {
            get { return _AgantList; }
            set { _AgantList = value; }
        }


        /// <summary>
        /// Setter and Getter to the agents list size
        /// </summary>
        public int Size
        {
            get { return _Size; }
            set { _Size = value; }
        }


        /// <summary>
        /// Setter and Getter to the agents list type
        /// </summary>
        public string Type
        {
            get { return _Type; }
            set { _Type = value; }
        }


        /// <summary>
        /// This function change specific agent type
        /// </summary>
        /// <param name="type">Type of agent</param>
        /// <param name="index">The specific index</param>
        public void ChangeAgentType(string type, int index)
        {
            _AgantList[index] = type;
        }


        /// <summary>
        /// This abstract function create the agents list.
        /// </summary>
        public abstract void CreateList();
    }
}
